package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AndroidDeviceMapper;
import com.ruoyi.system.domain.AndroidDevice;
import com.ruoyi.system.service.IAndroidDeviceService;

/**
 * 安卓设备Service业务层处理
 * 
 * @author lingyu
 * @date 2024-02-29
 */
@Service
public class AndroidDeviceServiceImpl implements IAndroidDeviceService 
{
    @Autowired
    private AndroidDeviceMapper androidDeviceMapper;

    /**
     * 查询安卓设备
     * 
     * @param id 安卓设备主键
     * @return 安卓设备
     */
    @Override
    public AndroidDevice selectAndroidDeviceById(Long id)
    {
        return androidDeviceMapper.selectAndroidDeviceById(id);
    }

    /**
     * 查询安卓设备列表
     * 
     * @param androidDevice 安卓设备
     * @return 安卓设备
     */
    @Override
    public List<AndroidDevice> selectAndroidDeviceList(AndroidDevice androidDevice)
    {
        return androidDeviceMapper.selectAndroidDeviceList(androidDevice);
    }

    /**
     * 新增安卓设备
     * 
     * @param androidDevice 安卓设备
     * @return 结果
     */
    @Override
    public int insertAndroidDevice(AndroidDevice androidDevice)
    {
        androidDevice.setCreateTime(DateUtils.getNowDate());
        return androidDeviceMapper.insertAndroidDevice(androidDevice);
    }

    /**
     * 修改安卓设备
     * 
     * @param androidDevice 安卓设备
     * @return 结果
     */
    @Override
    public int updateAndroidDevice(AndroidDevice androidDevice)
    {
        return androidDeviceMapper.updateAndroidDevice(androidDevice);
    }

    /**
     * 批量删除安卓设备
     * 
     * @param ids 需要删除的安卓设备主键
     * @return 结果
     */
    @Override
    public int deleteAndroidDeviceByIds(Long[] ids)
    {
        return androidDeviceMapper.deleteAndroidDeviceByIds(ids);
    }

    /**
     * 删除安卓设备信息
     * 
     * @param id 安卓设备主键
     * @return 结果
     */
    @Override
    public int deleteAndroidDeviceById(Long id)
    {
        return androidDeviceMapper.deleteAndroidDeviceById(id);
    }
}
